package com.hanxiaozhang.validation.annotation;


import com.hanxiaozhang.validation.validator.EnumRangeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 功能描述: <br>
 * 〈枚举类范围校验器注解〉
 *
 * @Author:hanxiaozhang
 * @Date: 2020/7/20
 */
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = EnumRangeValidator.class)
public @interface EnumRange {

    String message() default "类型错误!";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    Class<? extends Enum<?>> enumClass();

    String enumValidMethod();

}
